﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using DevExpress.Web.ASPxEditors;

using Entities;
using BLL;

namespace Stationery.UC
{
    public partial class UC_FaqOnScreen : System.Web.UI.UserControl
    {
        BLL_Faqs bll_Faqs = new BLL_Faqs();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Params["viewtype"] == null)
            {
                ControlBody.Controls.Add(LoadControl("~/UC/UC_TotalFaqs.ascx"));
            }            
            else if (Request.Params["viewtype"] == "detail")
            {                
                int newsid = 0;
                newsid = Convert.ToInt32(Request.Params["newsid"]);
                if (newsid == -1)
                    return; //or Invalid Page

                ControlBody.Controls.Add(LoadControl("~/UC/UC_FaqDetail.ascx"));
            }
            else
            {
                return; //or Invalid Page
            }                       
        }        
    }
}